home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 018a / macade.zip / EDITMAC.BAT < prev    next >
DOS Batch File  |  1991-12-07  |  2KB  |  60 lines

  1. :
  2. :                               EditMac.Bat
  3. :            A Component of EditM.wpm System for Accessing an
  4. :                External Editor from Within WordPerfect
  5. :                   for the Purpose of Editing Macros
  6. :
  7. :              Copyright (c) 1991 by Jeffrey S. Kane, Ph.D.
  8. :
  9. :******************************************************************************
  10. :
  11. ECHO OFF
  12. %2Macrolst %2%1 W
  13. IF ERRORLEVEL 5 GOTO DoEdit
  14. ECHO PLEASE NOTE THE ABOVE ERROR.
  15. ECHO  
  16. ECHO When you're ready, press any key and you'll be returned to Wordperfect
  17. PAUSE where you can make another effort to specify the macro name correctly.
  18. GOTO CompGood
  19. :DoEdit
  20. :
  21. : Change the line following this comment to reflect the command to invoke your
  22. : text editor.    Do NOT change the %2%1.LST part (which refers to the file to be
  23. : edited and should be the same for all editors), but rather simply replace the
  24. : "Q" with the command to start your editor.  If your editor is not in your
  25. : PATH, be sure to precede your editor command with its path specification.
  26. : If you're using QEDIT you need not change the command line below unless
  27. : Q.EXE is not in your path, in which case you'll need to add its path
  28. : specification (e.g., C:\QEDIT\Q %2%1.LST).
  29. :
  30. :CompBad
  31. Q %2%1.LST
  32. :
  33. IF NOT EXIST %2TildeChk.exe GOTO NoTilChk
  34. %2TildeChk %2%1
  35. IF ERRORLEVEL 11 GOTO CompErr1
  36. IF ERRORLEVEL 10 GOTO CompErr2
  37. :NoTilChk
  38. %2Mcompile %2%1 S
  39. IF ERRORLEVEL 10 GOTO CompErr3
  40. GOTO CompGood
  41. :CompErr1
  42. ECHO            A MISSING TILDE WAS FOUND AT THE LOCATION SPECIFIED ABOVE.
  43. GOTO CompErr4
  44. :CompErr2
  45. ECHO            MISSING TILDES WERE FOUND AT THE LOCATIONS SPECIFIED ABOVE.
  46. GOTO CompErr4
  47. :CompErr3
  48. ECHO               THE ABOVE ERROR(S) OCCURRED DURING MACRO COMPILATION.
  49. :CompErr4
  50. ECHO  
  51. ECHO              Press any key to correct the error(s) using your editor,
  52. ECHO                                       -OR-                                 
  53. ECHO              press CTRL-BREAK and then "Y" in response to the prompt       
  54. ECHO                            "Cancel batch job? (Y/N)"                       
  55. ECHO                            to return to WordPerfect.                       
  56. PAUSE :
  57. GOTO CompBad
  58. :CompGood
  59. ECHO ON
  60.